<template>
    <div id="setting" class="fw-500">
        <div class="option fs-14">
            <div @click="goPage('/modPassword')" class="item dis-flex flex-x-between flex-y-center">
                <span>修改密码</span>
                <van-icon name="arrow" color="#979797" size="0.4267rem" />
            </div>
            <div class="item dis-flex flex-x-between flex-y-center">
                <span>推送提醒</span>
                <van-switch v-model="checked" active-color="#f24b3a" />
            </div>
            <div @click="goPage('/aboutus')" class="item dis-flex flex-x-between flex-y-center">
                <span>关于我们</span>
                <van-icon name="arrow" color="#979797" size="0.4267rem" />
            </div>
        </div>
        <div
            @click="logout"
            class="logout fs-16 dis-flex flex-x-center flex-y-center"
        >
            退出登录
        </div>
    </div>
</template>

<script>
    import { Toast } from 'vant';
    export default {
        props: [], // 父辈向子辈传参
        name: 'setting',
        components: { // 组件的引用

        },
        data() {
            return {
                checked: true
            }
        },
        methods: {
            logout() {
                console.log("退出登录", this.$store);
            },
            goPage(link){
                this.$router.push(link)
            }
        },
        computed: {},
        watch: {},
        created() { },
        mounted() {
            
            // window.history.go(-1);
        },
    }
</script>
    
<style scoped lang='scss'>
    .option {
        background-color: #fff;
        padding: 0 14px;

        .item {
            padding: 14px 0;
            color: #3b3d3d;
            line-height: 20px;
        }
        .item:last-child {
            border-top: 1px solid #ebeef1;
        }
    }

    .logout {
        width: 375px;
        height: 48px;
        background: #ffffff;
        color: #F24B3A;
        line-height: 22px;
        margin-top: 16px;
        box-sizing: border-box;
    }
</style>